package com.tianji.aopdemo.controller;

import com.tianji.aopdemo.domain.User;
import com.tianji.aopdemo.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Yandel
 * @date 2025/8/18 下午7:35
 * @description:
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private IUserService userService;


    @RequestMapping("/getUserById/{id}")
    public User getUserById(Long id) {
        return userService.getUserById(id);
    }

    @RequestMapping("/list")
    public List<User> list() {
        return userService.list();
    }
}
